function result = miCalc()
    global T;
    YAuPath = ['my_FeatureYAu' num2str(T) '.mat'];
    YSpPath = ['my_FeatureYSp' num2str(T) '.mat'];
    load(YAuPath);
    load(YSpPath);
    
    YAu=FeatureYAu;
    YSp=FeatureYSp;
    
    unitRange = 20;
    
    [YAu_height,YAu_width] = size(YAu);
    [YSp_height,YSp_width] = size(YSp);
    
    YAuVec = zeros(YAu_width,unitRange);
    YSpVec = zeros(YAu_width,unitRange);
    
    for i = 1:YAu_width
        for j = 1:YAu_height
            pos = ceil(YAu(j,i)*unitRange);
            if pos == 0
                pos = 1;
            end
            YAuVec(i,pos) = YAuVec(i,pos) + 1;
        end
    end
    
    for i = 1:YSp_width
        for j = 1:YSp_height
            pos = ceil(YSp(j,i)*unitRange);
            if pos == 0
                pos = 1;
            end
            YSpVec(i,pos) = YSpVec(i,pos) + 1;
        end
    end
    
    YProb = zeros(1,YSp_width);
    for i = 1:YSp_width
        YAuV = YAuVec(i,:);
        YSpV = YSpVec(i,:);
        YProb(1,i) = myAmi(YAuV,YSpV);
    end
    result = YProb;
    result_x = result(2:2:end);
    result_y = result(1:2:end);
    
    square(result_x,['result_prob_',num2str(T),'_m.txt'],['T=',num2str(T),' Direction = x']);
    square(result_y,['result_prob_',num2str(T),'_m.txt'],['T=',num2str(T),' Direction = y']);
end